<table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
    <thead>
    <tr>
        <th>STT</th>
        <th>Name</th>
        <th>Image</th>
        <th>Sale</th>
        <th>Price</th>
        <th>Description</th>
        <th>Category</th>
        <th>Brand</th>
        <th>Function</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <?php if($list_all != NULL){ ?>
        <?php $i=1; foreach($list_all as $data){ ?>
        <td><?php echo $i; ?></td>
        <td class="center"><?php echo $data['product_name']; ?></td>
        <?php $image = unserialize($data['product_image']) ?>
        <?php //$img= explode(",",$image); ?>
        <td class="center"><center><img width="80px" height="80px" src="<?php echo base_url()."images/".$image[0];?>"/></center></td>
        <td class="center"><?php echo $data['product_sale']; ?>%</td>
        <td class="center"><span class="price_product"><?php echo number_format($data['product_price']); ?>đ</span> </td>
        <td class="center"><?php $b =  str_split($data['product_description'],10);
            print_r($b[0]."...") ;
            ?></td>
        <td><?php $cate = explode(',',$data['cate_id']);
            foreach($listcate as $v){
                foreach($cate as $k){
                    if($v['cate_id']==$k){
                        echo $v['cate_name'].'<br/>';
                    }
                }
            }
            ?></td>
        <td><?php foreach($listbrand as $v){
                if($v['brand_id'] == $data['brand_id']){
                    echo $v['brand_name'];
                }
            } ?></td>
        <td class="center">
            <a class="btn btn-success" href="<?php echo base_url()?>admincp/product/detailProduct/<?php echo $data['product_id']; ?>">
                <i class="glyphicon glyphicon-zoom-in icon-white"></i>
                View
            </a>
            <a class="btn btn-info" href="<?php echo base_url()?>admincp/product/editProduct/<?php echo $data['product_id']; ?>">
                <i class="glyphicon glyphicon-edit icon-white"></i>
                Edit
            </a>
            <a class="btn btn-danger" href="<?php echo base_url()?>admincp/product/deleteProduct/<?php echo $data['product_id']; ?>">
                <i class="glyphicon glyphicon-trash icon-white"></i>
                Delete
            </a>
        </td>
    </tr>
<?php $i++; } } ?>
    </tbody>
</table>
<div class="pagination-list"><?php echo $this->pagination->create_links(); ?></div>